<?php

namespace app\admin\controller\index;
use app\admin\model\Chat;
use \app\common\Common;
use think\Request;

class Overview extends Common
{
    public static function newDay(Request $request)
    {
        $res = Chat::newDay();
        return successJson("success",$res);
    }

    public static function operate(Request $request)
    {
        $data = $request->param("date_arr",[]);

        if(empty($data)) return failedJson("时间错误");
        $res = Chat::operate($data);
        return successJson("success",$res);
    }

    public static function sourceTJ(Request $request)
    {
        $data = $request->param("date_arr",[]);

        if(empty($data)) return failedJson("时间错误");
        $res = Chat::perOfVis($data);
        return successJson("success",$res);
    }

    public static function sourceNum(Request $request)
    {

        $data = $request->param("date_arr",[]);

        if(empty($data)) return failedJson("时间错误");

        $res = Chat::sourceNum($data);
        return successJson("success",$res);
    }
}